#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 crane <crane@crane-pc>
#
# Distributed under terms of the MIT license.

"""

"""


class Solution:

    SRC = 'A'
    MID = 'B'
    DST = 'C'

    def towerOfHanoi(self, n):
        self.ret = []
        self.tower_rec(n, 'A', 'B', 'C')
        return self.ret

    def tower_rec(self, n, src, mid, dst):
        if n == 0:
            return

        self.tower_rec(n-1, src=src, mid=dst, dst=mid)
        self.ret.append('from %s to %s' % (src, dst))
        self.tower_rec(n-1, src=mid, mid=src, dst=dst)



def main():
    print("start main")
    s = Solution()
    ret = s.towerOfHanoi(3)

    print(ret)

if __name__ == "__main__":
    main()
